All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JInternalFrame

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JInternalFrame

public class JInternalFrame
extends JComponent
implements Accessible, MouseListener, MouseMotionListener, WindowConstants, RootPaneContainer, ComponentListener
A lightweight object that provides many of the features of a native frame, including dragging, closing, becoming an icon, resizing, title display, and support for a menu bar. Generally, you create an instance and add it to a JDesktopPane. Look and feel specific-actions are then (automatically??) delegated to the DesktopManager object maintained by the JDesktopPane (as set by the UI).

The JInternalFrame contentPane is where you add child components. So, to create a JInternalFrame that has a number of buttons arranged with a BorderLayout object, you might do something like this:

    JComponent c = frame.getContentPane();
    c.setLayoutManager(new BorderLayout());
    c.add(new JButton(), BorderLayout.NORTH);
    c.add(new JButton(), BorderLayout.CENTER);
 
The contentPane is actually managed by an instance of JRootPane, which also manages a layoutPane, glassPane, and optional menuBar for the frame. Please see the JRootPane documentation for a complete description of these components.

For the keyboard keys used by this component in the standard Look and Feel (L&F) renditions, see the JInternalFrame key assignments.

Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.

See Also:
JDesktopPane, DesktopManager, JInternalFrame. JDesktopIcon, JRootPane

Variable Index

 o closable
The frame can be closed.
 o CONTENT_PANE_PROPERTY
Bound property name.
 o desktopIcon
The icon that is displayed when the frame is iconized.
 o frameIcon
The icon shown in the top-left corner of the frame.
 o GLASS_PANE_PROPERTY
Bound property name.
 o iconable
The frame can "iconized" (shrunk down and displayed as an icon-image).
 o IS_CLOSED_PROPERTY
Constrained property name indicating that the frame is closed.
 o IS_ICON_PROPERTY
Constrained property name indicating that the frame is iconified.
 o IS_MAXIMUM_PROPERTY
Constrained property name indicating that the frame is maximized.
 o IS_SELECTED_PROPERTY
Constrained property name indicated that this frame has selected status.
 o isClosed
The frame has been closed.
 o isIcon
The frame has been iconized.
 o isMaximum
The frame has been expanded to its maximum size.
 o isSelected
The frame is currently selected.
 o LAYERED_PANE_PROPERTY
Bound property name.
 o maximizable
The frame can be expanded to the size of the desktop pane.
 o MENU_BAR_PROPERTY
Bound property name.
 o resizable
The frame's size can be changed.
 o ROOT_PANE_PROPERTY
Bound property name.
 o rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.
 o rootPaneCheckingEnabled
If true then calls to add and setLayout cause an exception to be thrown.
 o title
The title displayed in the frame's title bar.
 o TITLE_PROPERTY
Bound property name.

Constructor Index

 o JInternalFrame()
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with no title.
 o JInternalFrame(String)
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title.
 o JInternalFrame(String, boolean)
Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability specified.
 o JInternalFrame(String, boolean, boolean)
Creates a non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability and closability specified.
 o JInternalFrame(String, boolean, boolean, boolean)
Creates a non-iconifiable JInternalFrame with the specified title and with resizability, closability, and maximizability specified.
 o JInternalFrame(String, boolean, boolean, boolean, boolean)
Creates a JInternalFrame with the specified title and with resizability, closability, maximizability, and iconifiability specified.

Method Index

 o addImpl(Component, Object, int)
By default, children may not be added directly to a this component, they must be added to its contentPane instead.
 o addInternalFrameListener(InternalFrameListener)
Adds the specified internal frame listener to receive internal frame events from this internal frame.
 o componentHidden(ComponentEvent)
 o componentMoved(ComponentEvent)
 o componentResized(ComponentEvent)
Invoked when a maximized JInternalFrame's parent's size changes.
 o componentShown(ComponentEvent)
 o createRootPane()
Called by the constructor to set up the JRootPane.
 o dispose()
Disposes of this internal frame.
 o getAccessibleContext()
Get the AccessibleContext associated with this JComponent
 o getBackground()
Get the background color of this object.
 o getContentPane()
 o getDefaultCloseOperation()
Returns the default operation which occurs when the user initiates a "close" on this window.
 o getDesktopIcon()
Returns the JDesktopIcon used when this JInternalFrame is iconified.
 o getDesktopPane()
Convenience method that searchs the anscestor heirarchy for a JDesktop instance.
 o getForeground()
Get the foreground color of this object.
 o getFrameIcon()
Returns the image displayed in the title bar of the frame (usually in the top-left corner).
 o getGlassPane()
 o getLayer()
Convenience method for getting the layer attribute of this component.
 o getLayeredPane()
 o getMenuBar()
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.
 o getRootPane()
Returns the JRootPane ancestor for a component
 o getTitle()
Returns the title of the JInternalFrame.
 o getUI()
Returns the L&F object that renders this component.
 o getUIClassID()
Returns the name of the L&F class that renders this component.
 o getWarningString()
Gets the warning string that is displayed with this window.
 o isClosable()
Returns whether this JInternalFrame be closed by some user action.
 o isClosed()
Returns whether this JInternalFrame is currently closed.
 o isIcon()
Returns whether the JInternalFrame is currently iconified.
 o isIconifiable()
Returns whether the JInternalFrame can be iconified by some user action.
 o isMaximizable()
Returns whether the JInternalFrame can be maximized by some user action.
 o isMaximum()
Returns whether the JInternalFrame is currently maximized.
 o isResizable()
Returns whether the JInternalFrame can be resized by some user action.
 o isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown.
 o isSelected()
Returns whether the JInternalFrame is the currently "selected" or active frame.
 o mouseClicked(MouseEvent)
Ignore mouseClicked events.
 o mouseDragged(MouseEvent)
Ignore mouseDragged events.
 o mouseEntered(MouseEvent)
Forward the mouseEntered event to the underlying child container.
 o mouseExited(MouseEvent)
Forward the mouseExited event to the underlying child container.
 o mouseMoved(MouseEvent)
Forward the mouseMoved event to the underlying child container.
 o mousePressed(MouseEvent)
When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child component.
 o mouseReleased(MouseEvent)
Ignore mouseReleased events.
 o moveToBack()
Convenience method that moves this component to position -1 if it's parent is a JLayeredPane.
 o moveToFront()
Convenience method that moves this component to position 0 if it's parent is a JLayeredPane.
 o pack()
Causes subcomponents of this JInternalFrame to be laid out at their preferred size.
 o processEvent(AWTEvent)
Processes events on this internal frame.
 o removeInternalFrameListener(InternalFrameListener)
Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.
 o reshape(int, int, int, int)
Moves and resizes this component.
 o setBackground(Color)
Set the background color of this object.
 o setClosable(boolean)
Set that this JInternalFrame can be closed by some user action.
 o setClosed(boolean)
Calling this method with a value of true to close the frame.
 o setContentPane(Container)
Sets this JInternalFrame's content pane.
 o setDefaultCloseOperation(int)
Sets the operation which will happen by default when the user initiates a "close" on this window.
 o setDesktopIcon(JInternalFrame. JDesktopIcon)
Sets the JDesktopIcon associated with this JInternalFrame.
 o setForeground(Color)
Set the foreground color of this object.
 o setFrameIcon(Icon)
Sets an image to be displayed in the titlebar of the frame (usually in the top-left corner).
 o setGlassPane(Component)
Sets this JInternalFrame's glass pane.
 o setIcon(boolean)
Iconizes and deconizes the frame.
 o setIconifiable(boolean)
Set that the JInternalFrame can be made an icon by some user action.
 o setLayer(Integer)
Convenience method for setting the layer attribute of this component.
 o setLayeredPane(JLayeredPane)
Sets this JInternalFrame's layered pane.
 o setLayout(LayoutManager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead.
 o setMaximizable(boolean)
Set that the JInternalFrame can be maximized by some user action.
 o setMaximum(boolean)
Maximizes and restores the frame.
 o setMenuBar(JMenuBar)
Sets the JMenuBar for this JInternalFrame.
 o setResizable(boolean)
Set that the JInternalFrame can be resized by some user action.
 o setRootPane(JRootPane)
Set the rootPane property.
 o setRootPaneCheckingEnabled(boolean)
Determines whether calls to add and setLayout cause an exception to be thrown.
 o setSelected(boolean)
Selects and deselects the JInternalFrame.
 o setTitle(String)
Sets the JInternalFrame title.
 o setUI(InternalFrameUI)
Sets the UI delegate for this JInternalFrame.
 o setVisible(boolean)
Set the visible state of the object.
 o show()
Shows this internal frame, and brings it to the front.
 o toBack()
Sends this internal frame to the back.
 o toFront()
Brings this internal frame to the front.
 o updateUI()
Notification from the UIManager that the L&F has changed.

Variables

 o rootPane
 protected JRootPane rootPane
The JRootPane instance that manages the contentPane and optional menuBar for this frame, as well as the glassPane.

See Also:
JRootPane, RootPaneContainer
 o rootPaneCheckingEnabled
 protected boolean rootPaneCheckingEnabled
If true then calls to add and setLayout cause an exception to be thrown.

 o closable
 protected boolean closable
The frame can be closed.

 o isClosed
 protected boolean isClosed
The frame has been closed.

 o maximizable
 protected boolean maximizable
The frame can be expanded to the size of the desktop pane.

 o isMaximum
 protected boolean isMaximum
The frame has been expanded to its maximum size.

See Also:
maximizable
 o iconable
 protected boolean iconable
The frame can "iconized" (shrunk down and displayed as an icon-image).

See Also:
JInternalFrame. JDesktopIcon
 o isIcon
 protected boolean isIcon
The frame has been iconized.

See Also:
iconable
 o resizable
 protected boolean resizable
The frame's size can be changed.

 o isSelected
 protected boolean isSelected
The frame is currently selected.

 o frameIcon
 protected Icon frameIcon
The icon shown in the top-left corner of the frame.

 o title
 protected String title
The title displayed in the frame's title bar.

 o desktopIcon
 protected JInternalFrame. JDesktopIcon desktopIcon
The icon that is displayed when the frame is iconized.

See Also:
iconable
 o CONTENT_PANE_PROPERTY
 public static final String CONTENT_PANE_PROPERTY
Bound property name.

 o MENU_BAR_PROPERTY
 public static final String MENU_BAR_PROPERTY
Bound property name.

 o TITLE_PROPERTY
 public static final String TITLE_PROPERTY
Bound property name.

 o LAYERED_PANE_PROPERTY
 public static final String LAYERED_PANE_PROPERTY
Bound property name.

 o ROOT_PANE_PROPERTY
 public static final String ROOT_PANE_PROPERTY
Bound property name.

 o GLASS_PANE_PROPERTY
 public static final String GLASS_PANE_PROPERTY
Bound property name.

 o IS_SELECTED_PROPERTY
 public static final String IS_SELECTED_PROPERTY
Constrained property name indicated that this frame has selected status.

 o IS_CLOSED_PROPERTY
 public static final String IS_CLOSED_PROPERTY
Constrained property name indicating that the frame is closed.

 o IS_MAXIMUM_PROPERTY
 public static final String IS_MAXIMUM_PROPERTY
Constrained property name indicating that the frame is maximized.

 o IS_ICON_PROPERTY
 public static final String IS_ICON_PROPERTY
Constrained property name indicating that the frame is iconified.

Constructors

 o JInternalFrame
 public JInternalFrame()
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with no title.

 o JInternalFrame
 public JInternalFrame(String title)
Creates a non-resizable, non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title.

Parameters:
title - the String to display in the title bar.
 o JInternalFrame
 public JInternalFrame(String title,
                       boolean resizable)
Creates a non-closable, non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability specified.

Parameters:
title - the String to display in the title bar.
resizable - if true, the frame can be resized
 o JInternalFrame
 public JInternalFrame(String title,
                       boolean resizable,
                       boolean closable)
Creates a non-maximizable, non-iconifiable JInternalFrame with the specified title and with resizability and closability specified.

Parameters:
title - the String to display in the title bar.
resizable - if true, the frame can be resized
closable - if true, the frame can be closed
 o JInternalFrame
 public JInternalFrame(String title,
                       boolean resizable,
                       boolean closable,
                       boolean maximizable)
Creates a non-iconifiable JInternalFrame with the specified title and with resizability, closability, and maximizability specified.

Parameters:
title - the String to display in the title bar.
resizable - if true, the frame can be resized
closable - if true, the frame can be closed
maximizable - if true, the frame can be maximized
 o JInternalFrame
 public JInternalFrame(String title,
                       boolean resizable,
                       boolean closable,
                       boolean maximizable,
                       boolean iconifiable)
Creates a JInternalFrame with the specified title and with resizability, closability, maximizability, and iconifiability specified.

Parameters:
title - the String to display in the title bar.
resizable - if true, the frame can be resized
closable - if true, the frame can be closed
maximizable - if true, the frame can be maximized
iconifiable - if true, the frame can be iconified

Methods

 o createRootPane
 protected JRootPane createRootPane()
Called by the constructor to set up the JRootPane.

See Also:
JRootPane
 o getUI
 public InternalFrameUI getUI()
Returns the L&F object that renders this component.

Returns:
the InternalFrameUI object that renders this component
 o setUI
 public void setUI(InternalFrameUI ui)
Sets the UI delegate for this JInternalFrame.

 o updateUI
 public void updateUI()
Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.

Overrides:
updateUI in class JComponent
See Also:
updateUI
 o getUIClassID
 public String getUIClassID()
Returns the name of the L&F class that renders this component.

Returns:
"InternalFrameUI"
Overrides:
getUIClassID in class JComponent
See Also:
getUIClassID, getUI
 o isRootPaneCheckingEnabled
 protected boolean isRootPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown.

Returns:
true if add and setLayout are checked
See Also:
addImpl, setLayout, setRootPaneCheckingEnabled
 o setRootPaneCheckingEnabled
 protected void setRootPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout cause an exception to be thrown.

Parameters:
enabled - a boolean value, true if checking is to be enabled, which cause the exceptions to be thrown
See Also:
addImpl, setLayout, isRootPaneCheckingEnabled
 o addImpl
 protected void addImpl(Component comp,
                        Object constraints,
                        int index)
By default, children may not be added directly to a this component, they must be added to its contentPane instead. For example:
 thisComponent.getContentPane().add(child)
 
An attempt to add to directly to this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.

Throws: Error
if called with rootPaneChecking true
Overrides:
addImpl in class Container
See Also:
setRootPaneCheckingEnabled
 o setLayout
 public void setLayout(LayoutManager manager)
By default the layout of this component may not be set, the layout of its contentPane should be set instead. For example:
 thiComponent.getContentPane().setLayout(new BorderLayout())
 
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.

Throws: Error
if called with rootPaneChecking true
Overrides:
setLayout in class Container
See Also:
setRootPaneCheckingEnabled
 o getMenuBar
 public JMenuBar getMenuBar()
Returns the current JMenuBar for this JInternalFrame, or null if no menu bar has been set.

Returns:
the JMenuBar used by this frame
See Also:
setMenuBar
 o setMenuBar
 public void setMenuBar(JMenuBar m)
Sets the JMenuBar for this JInternalFrame.

Parameters:
m - the JMenuBar to use in this frame
See Also:
getMenuBar
 o getContentPane
 public Container getContentPane()
 o setContentPane
 public void setContentPane(Container c)
Sets this JInternalFrame's content pane.

Parameters:
c - the Container to use for the contents of this JInternalFrame
Throws: IllegalComponentStateException
(a runtime exception) if the content pane parameter is null
See Also:
getContentPane
 o getLayeredPane
 public JLayeredPane getLayeredPane()
 o setLayeredPane
 public void setLayeredPane(JLayeredPane layered)
Sets this JInternalFrame's layered pane.

Throws: IllegalComponentStateException
(a runtime exception) if the layered pane parameter is null
See Also:
setLayeredPane
 o getGlassPane
 public Component getGlassPane()
 o setGlassPane
 public void setGlassPane(Component glass)
Sets this JInternalFrame's glass pane.

See Also:
getGlassPane
 o getRootPane
 public JRootPane getRootPane()
Returns the JRootPane ancestor for a component

Overrides:
getRootPane in class JComponent
 o setRootPane
 protected void setRootPane(JRootPane root)
Set the rootPane property. This method is called by the constructor.

 o setVisible
 public void setVisible(boolean b)
Set the visible state of the object.

Parameters:
b - if true, shows this object; otherwise, hides it
Overrides:
setVisible in class JComponent
 o setClosable
 public void setClosable(boolean b)
Set that this JInternalFrame can be closed by some user action.

Parameters:
b - a boolean value, where true means the frame can be closed
 o isClosable
 public boolean isClosable()
Returns whether this JInternalFrame be closed by some user action.

Returns:
true if the frame can be closed
 o isClosed
 public boolean isClosed()
Returns whether this JInternalFrame is currently closed.

Returns:
true if the frame is closed
 o setClosed
 public void setClosed(boolean b) throws PropertyVetoException
Calling this method with a value of true to close the frame.

Parameters:
b - a boolean, where true means "close the frame"
Throws: PropertyVetoException
when the attempt to set the property is vetoed by the receiver.
 o setResizable
 public void setResizable(boolean b)
Set that the JInternalFrame can be resized by some user action.

Parameters:
b - a boolean, where true means the frame can be resized
 o isResizable
 public boolean isResizable()
Returns whether the JInternalFrame can be resized by some user action.

Returns:
true if the frame can be resized
 o setIconifiable
 public void setIconifiable(boolean b)
Set that the JInternalFrame can be made an icon by some user action.

Parameters:
b - a boolean, where true means the frame can be iconified
 o isIconifiable
 public boolean isIconifiable()
Returns whether the JInternalFrame can be iconified by some user action.

Returns:
true if the frame can be iconified
 o isIcon
 public boolean isIcon()
Returns whether the JInternalFrame is currently iconified.

Returns:
true if the frame is iconified
 o setIcon
 public void setIcon(boolean b) throws PropertyVetoException
Iconizes and deconizes the frame.

Parameters:
b - a boolean, where true means to iconify the frame and false means to deiconify it
Throws: PropertyVetoException
when the attempt to set the property is vetoed by the receiver.
 o setMaximizable
 public void setMaximizable(boolean b)
Set that the JInternalFrame can be maximized by some user action.

Parameters:
b - a boolean where true means the frame can be maximized
 o isMaximizable
 public boolean isMaximizable()
Returns whether the JInternalFrame can be maximized by some user action.

Returns:
true if the frame can be maximized
 o isMaximum
 public boolean isMaximum()
Returns whether the JInternalFrame is currently maximized.

Returns:
true if the frame is maximized
 o setMaximum
 public void setMaximum(boolean b) throws PropertyVetoException
Maximizes and restores the frame. A maximized frame is resized to fully fit the JDesktopPane area associated with the JInternalFrame. A restored frame's size is set to the JInternalFrame's actual size.

Parameters:
b - a boolean, where true maximizes the frame and false restores it
Throws: PropertyVetoException
when the attempt to set the property is vetoed by the receiver.
 o getTitle
 public String getTitle()
Returns the title of the JInternalFrame.

Returns:
a String containing the frame's title
See Also:
setTitle
 o setTitle
 public void setTitle(String title)
Sets the JInternalFrame title.

Parameters:
title - the String to display in the title bar
See Also:
title
 o setSelected
 public void setSelected(boolean selected) throws PropertyVetoException
Selects and deselects the JInternalFrame. A JInternalFrame normally draws it's title bar differently if it is the selected frame, which indicates to the user that this internalFrame has the focus.

Parameters:
selected - a boolean, where true means the frame is selected (currently active) and false means it is not
Throws: PropertyVetoException
when the attempt to set the property is vetoed by the receiver.
 o isSelected
 public boolean isSelected()
Returns whether the JInternalFrame is the currently "selected" or active frame.

Returns:
true if the frame is currently selected (active)
See Also:
setSelected
 o setFrameIcon
 public void setFrameIcon(Icon icon)
Sets an image to be displayed in the titlebar of the frame (usually in the top-left corner). This image is not the desktopIcon object, which is the image displayed in the JDesktop when the frame is iconified.

Parameters:
icon - the Icon to display in the title bar
See Also:
desktopIcon
 o getFrameIcon
 public Icon getFrameIcon()
Returns the image displayed in the title bar of the frame (usually in the top-left corner).

Returns:
the Icon displayed in the title bar
 o getBackground
 public Color getBackground()
Get the background color of this object.

Returns:
the background color, if supported, of the object; otherwise, null
Overrides:
getBackground in class Component
 o setBackground
 public void setBackground(Color c)
Set the background color of this object. (For transparency, see isOpaque.)

Parameters:
c - the new Color for the background
Overrides:
setBackground in class Component
See Also:
isOpaque
 o getForeground
 public Color getForeground()
Get the foreground color of this object.

Returns:
the foreground color, if supported, of the object; otherwise, null
Overrides:
getForeground in class Component
 o setForeground
 public void setForeground(Color c)
Set the foreground color of this object.

Parameters:
c - the new Color for the foreground
Overrides:
setForeground in class Component
 o moveToFront
 public void moveToFront()
Convenience method that moves this component to position 0 if it's parent is a JLayeredPane.

 o moveToBack
 public void moveToBack()
Convenience method that moves this component to position -1 if it's parent is a JLayeredPane.

 o setLayer
 public void setLayer(Integer layer)
Convenience method for setting the layer attribute of this component.

Parameters:
layer - an Integer object specifying this frame's desktop layer
See Also:
JLayeredPane
 o getLayer
 public int getLayer()
Convenience method for getting the layer attribute of this component.

Returns:
an Integer object specifying this frame's desktop layer
See Also:
JLayeredPane
 o getDesktopPane
 public JDesktopPane getDesktopPane()
Convenience method that searchs the anscestor heirarchy for a JDesktop instance. If JInternalFrame finds none, the desktopIcon tree is searched.

Returns:
the JDesktopPane this frame belongs to, or null if none is found
 o setDesktopIcon
 public void setDesktopIcon(JInternalFrame. JDesktopIcon d)
Sets the JDesktopIcon associated with this JInternalFrame.

Parameters:
d - the JDesktopIcon to display on the desktop
See Also:
desktopIcon
 o getDesktopIcon
 public JInternalFrame. JDesktopIcon getDesktopIcon()
Returns the JDesktopIcon used when this JInternalFrame is iconified.

Returns:
the JDesktopIcon displayed on the desktop
See Also:
desktopIcon
 o reshape
 public void reshape(int x,
                     int y,
                     int width,
                     int height)
Moves and resizes this component. Unlike other components, this implementation also forces re-layout, so that frame decorations such as the title bar are always redisplayed.

Parameters:
x - an int giving the component's new horizontal position measured in pixels from the left of its container
y - an int giving the component's new vertical position, measured in pixels from the bottom of its container
width - an int giving the component's new width in pixels
height - an int giving the component's new height in pixels
Overrides:
reshape in class JComponent
 o addInternalFrameListener
 public synchronized void addInternalFrameListener(InternalFrameListener l)
Adds the specified internal frame listener to receive internal frame events from this internal frame.

Parameters:
l - the internal frame listener
 o removeInternalFrameListener
 public synchronized void removeInternalFrameListener(InternalFrameListener l)
Removes the specified internal frame listener so that it no longer receives internal frame events from this internal frame.

Parameters:
l - the internal frame listener
 o processEvent
 protected void processEvent(AWTEvent e)
Processes events on this internal frame. If the event has a InternalFrameEvent id, it notifies its internalFrameListener, else it invokes its superclass's processEvent.

Parameters:
e - the event
Overrides:
processEvent in class Container
 o setDefaultCloseOperation
 public void setDefaultCloseOperation(int operation)
Sets the operation which will happen by default when the user initiates a "close" on this window. The possible choices are:

The value is set to HIDE_ON_CLOSE by default.

See Also:
addInternalFrameListener, getDefaultCloseOperation
 o getDefaultCloseOperation
 public int getDefaultCloseOperation()
Returns the default operation which occurs when the user initiates a "close" on this window.

See Also:
setDefaultCloseOperation
 o pack
 public void pack()
Causes subcomponents of this JInternalFrame to be laid out at their preferred size.

See Also:
pack
 o show
 public void show()
Shows this internal frame, and brings it to the front.

If this window is not yet visible, show makes it visible. If this window is already visible, then this method brings it to the front.

Overrides:
show in class Component
See Also:
show, toFront, setVisible
 o dispose
 public void dispose()
Disposes of this internal frame. If the frame is not already closed, a frame-closing event is posted.

 o toFront
 public void toFront()
Brings this internal frame to the front. Places this internal frame at the top of the stacking order and makes the corresponding adjustment to other visible windows.

See Also:
toFront, moveToFront
 o toBack
 public void toBack()
Sends this internal frame to the back. Places this internal frame at the bottom of the stacking order and makes the corresponding adjustment to other visible windows.

See Also:
toBack, moveToBack
 o getWarningString
 public final String getWarningString()
Gets the warning string that is displayed with this window. Since an internal frame is always secure (since it's fully contained within a window which might need a warning string) this method always returns null.

Returns:
null
See Also:
getWarningString
 o mousePressed
 public void mousePressed(MouseEvent e)
When inactive, mouse events are forwarded as appropriate either to the UI to activate the frame or to the underlying child component. In keeping with the MDI messaging model (which JInternalFrame emulates), only the mousePressed event is forwarded to the UI to activate the frame. The mouseEntered, mouseMoved, and MouseExited events are forwarded to the underlying child component, using methods derived from those in Container. The other mouse events are purposely ignored, since they have no meaning to either the frame or its children when the frame is inactive.

 o mouseEntered
 public void mouseEntered(MouseEvent e)
Forward the mouseEntered event to the underlying child container.

See Also:
mousePressed
 o mouseMoved
 public void mouseMoved(MouseEvent e)
Forward the mouseMoved event to the underlying child container.

See Also:
mousePressed
 o mouseExited
 public void mouseExited(MouseEvent e)
Forward the mouseExited event to the underlying child container.

See Also:
mousePressed
 o mouseClicked
 public void mouseClicked(MouseEvent e)
Ignore mouseClicked events.

See Also:
mousePressed
 o mouseReleased
 public void mouseReleased(MouseEvent e)
Ignore mouseReleased events.

See Also:
mousePressed
 o mouseDragged
 public void mouseDragged(MouseEvent e)
Ignore mouseDragged events.

See Also:
mousePressed
 o componentResized
 public void componentResized(ComponentEvent e)
Invoked when a maximized JInternalFrame's parent's size changes.

 o componentMoved
 public void componentMoved(ComponentEvent e)
 o componentShown
 public void componentShown(ComponentEvent e)
 o componentHidden
 public void componentHidden(ComponentEvent e)
 o getAccessibleContext
 public AccessibleContext getAccessibleContext()
Get the AccessibleContext associated with this JComponent

Returns:
the AccessibleContext of this JComponent
Overrides:
getAccessibleContext in class JComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index